package nl.utwente.csc.obsl.diagram.extension.figure;


import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.sirius.diagram.ui.tools.api.figure.StyledFigure;

public class KindFigure extends Shape implements StyledFigure {

	
	 protected void outlineShape(final Graphics graphics) {
		 graphics.drawRectangle(rect());
	 }
	 
	 protected void fillShape(final Graphics graphics) {
		 graphics.fillRectangle(rect());
	 }
		 
	public KindFigure() {
	}	
	protected Rectangle rect() {
		final Rectangle r = new Rectangle();
		r.x = bounds.x + getLineWidth() / 2;
		r.y = bounds.y + getLineWidth() / 2;
		r.width = bounds.width - getLineWidth();
		r.height = bounds.height - getLineWidth();

		return r;
	}
	
	

}